<div class="walk-home-container">
    <div class="walk-home-image">
        <img src="<?php echo( base_url() ); ?>assets/images/guru.jpg" />
    </div>
	
	<div class="walk-home-content">
		<div class="validation-errors" id="validationErrors" style="display:none; width: 300px;"></div>
		<?php
			Includes::IncludeFile( Includes::$FORM );
		
			echo( form_open(base_url() . 'cmb/member/login_home_process/' , array('id' => 'LoginFormHome') ) );
				
				if( $loginFailed )
				{
					echo('<div><strong>Invalid User Name and/or Password</strong></div>');
				}
				
				Form::OpenFormItem('User Name:', 150);
					echo( form_input(array('name'=>'userName','id'=>'userName','style'=>'width: 200px;', 'onkeyup'=>'loginKeyUp(event);')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Password:', 150);
					echo( form_password(array('name'=>'password','id'=>'password','style'=>'width: 200px;', 'onkeyup'=>'loginKeyUp(event);')) );
				Form::CloseFormItem();
			echo( form_close() );
		?>
		<div>
			<a href="javascript: validate();"><img src="<?php echo( base_url() );?>assets/images/buttons/sign_in1.gif" border="0"/></a>
		</div>
		<div>
			&nbsp;&nbsp;<a href="<?php echo( base_url() );?>cmb/member/forgot_password" target="_self"><font size="1">(Forgot Password)</font></a>
		</div>

        <!--<div>
            <p> <br/> </p>
            <font size="3" color="red">2012-2013 Member Registration Opens on May 20th, 2012</font>
        </div>-->

		<div>
			<p> <br/> </p>
			<a href="<?php echo( base_url() );?>cmb/registration_home/metrowest" target="_self"><font size="3">New Member Registration</font></a>
			<p> <br/> </p>
		</div>

        <h2>Announcements</h2>
        <ul>
             <li>Metro-West Bala Vihar would like to welcome you to the new 2012-13 year</li>
             <li>Mahasamathi camp was a great success. Next year's camp is scheduled at Ann Arbor, Michigan. Please mark your calendar from 29th July-3rd Aug.</li>
        </ul> 

		<h2>Key Highlights</h2>
		<ul>
            <li>Registrations are open for 2012-2013</li>
            <li>Bala Vihar classes every Sunday: 3:30pm - 5:00pm</li>
            <li>Comprehensive curriculum based on scriptures</li>
            <li>Language classes offered are Hindi, Kannada,  Sanskrit, Tamil, Telugu</li>
            <li>Language class time: 2:30pm - 3:25pm</li>
            <li>Annual fee for membership is $400 per family</li>
		</ul>       
       
		<p style="font-style: italic;">
			<br/>
			<br/>
            For questions email: <?php echo safe_mailto('cmb.metrowest@gmail.com','Questions'); ?>
            <br/>
            Phone: 1-508-98 MW CMB
            <br/>
            Address: 45 Oak St, Westborough, MA 01581
            <br/>
		</p>
        
	<p>
    	<a href="http://www.chinmaya-boston.com" target="_blank">Chinmaya Mission Boston</a>
        <br/>
        <a href="http://www.chinmayamission.com/" target="_blank">Central Chinmaya Mission Trust</a>
	</p>
	</div>
	<div class="clear"></div>
</div>


<script type="text/javascript">
	function loginKeyUp(event)
	{
		if( event.keyCode == 13 )
		{
			validate();
		}
	}
	
	function validate()
	{
		new Ajax.Request(baseUrl + 'validation/login_validation/validate_login/', 
		{
			method:'post',
			parameters: Form.serialize( $('LoginFormHome') ),
		  	onSuccess: function(response)
			{
				var result = response.responseText;
				
				if( result == 'VALIDATION_SUCCESS' )
				{
					$('LoginFormHome').submit();
				}
				else
				{
					$('validationErrors').innerHTML = result;
					$('validationErrors').show();
					Effect.ScrollTo('validationErrors', { duration:'0.2', offset:-20 });
				}
			},
			onFailure: function(response){}
		});
	}
</script>